/*
 * @Author: jiu yin
 * @Date: 2025-02-20 17:07:37
 * @LastEditTime: 2025-02-20 18:25:11
 * @LastEditors: jiu yin zhen jing
 * @FilePath: \studio-web-admin\electron\node-socket-service\utils.js
 */
const path = require("path");





//electron:dev || electron:build 获取node根路径
function getRootPath() {
	switch (process.env.NODE_ENV) {
      case "development":
			return process.cwd()
		case "build":
			return rootPath = process.cwd()
		case "electron:dev":
			return path.join(process.cwd(), "electron/node-socket-service");
		case "electron:build":
			return  process.env.rootPath;
	}
}
let rootPath = getRootPath() || "";

module.exports = {
	rootPath,
};
